<template>
	<div id="#app">
		<div class="content">
        <h1>实验汇总表</h1>
            <el-table style="width: 100%;">
            <el-table-column  label="姓名">
				{{collection1.name}}
			</el-table-column>
			<el-table-column  v-for="item in (student.myData)" :label="item">
			</el-table-column>
			<el-table-column label="提交次数" >
				<template scope="scope">
                    <el-button size="small"  @click.native="teacherCheck(scope.$index, scope.row)">查看</el-button>
					<el-button size="small"  @click.native="teacherEdit(scope.$index, scope.row)">编辑</el-button>
					<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
				</template>
			</el-table-column>
		</el-table>
        <el-button type="primary" @click="back">返回</el-button>
    </div>
	</div>
</template>

<script>
    import { mapState } from 'vuex'
    export default{
        data(){
            return {
                student: {
                myData: ["实验一", "实验二", "实验三", "..."],
            }

            }
        },

        methods:{

			back() {

            this.$confirm('是否返回?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                this.$message({
                    type: 'success',
                });
                this.$router.go(-1);
            }).catch(() => {
                this.$message({
                    type: 'info',
                    message: '已返回'
                });
            });

        },
        },
        computed: mapState({
                // 映射 this.count 为 store.state.count
                collection1: state => state.collection,


            }
        ),

    }
</script>
<style scoped>
	.content{
		width:1200px;
		margin: 0 auto;
	}
	.content button{
		margin-top: 20px;
	}
</style>